/*
 * Othello.java
 */
package othello;

import othello.logic.GameManager;
import othello.gui.SplashFrame;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class Othello implements ActionListener {

    GUIC guic;
    GameManager gm;
    Thread thread = null;
    Runnable runnable = new Runnable() {
        public void run() {
            guic.dispose();
            guic.showSetupGameDialog();
            gm.setNewPlayers(guic);
            gm.newRound();
        }
    };

    public Othello() {
        new SplashFrame();
        guic = new GUIC(this);

        guic.showSetupGameDialog();
        gm = new GameManager(guic);
        gm.newRound();
    }

    public static void main(String[] args) {
        new Othello();
    }

    public void actionPerformed(ActionEvent ae) {
        guic.dispose();
        thread = new Thread(runnable);
        thread.start();
    }
}
